<!--
 * @Date: 2023-07-31 14:01:38
 * @LastEditors: lijingang
 * @LastEditTime: 2023-07-31 14:30:24
 * @FilePath: /ds-brain-web/src/views/login/components/Password.vue
-->
<template>
  <div>
    <sec-input
      v-model="password"
      size="small"
      :type="type"
      auto-complete="off"
      placeholder="请输入密码"
      @input="change"
    >
      <i
        slot="suffix"
        :style="{ cursor: 'pointer' }"
        class="el-input__icon"
        :class="
          type === 'password' ? 'sec-icon-a-chakankeshi' : 'sec-icon-bukejian'
        "
        @click="showPassword"
      ></i>
      <i slot="prefix" class="icon-mima"></i>
    </sec-input>
  </div>
</template>
<style lang="scss" scope></style>
<script>
export default {
  name: 'Password',
  props: {
    change: {
      type: Function,
      default: () => {}
    }
  },
  data() {
    return {
      password: '',
      type: 'password'
    }
  },
  computed: {},
  mounted() {},
  created() {},
  methods: {
    showPassword() {
      this.type === '' ? (this.type = 'password') : (this.type = '')
    }
  }
}
</script>
